﻿<phone:PhoneApplicationPage
    x:Class="NfcOrchestra.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    Style="{StaticResource TransitionPageStyle}">
    
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="FadeoutStoryboard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"  >
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.3">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:3" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>

	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{Binding LocalizedResources.ApplicationTitle, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
            <TextBlock Text="{Binding LocalizedResources.MainPageTitle, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,1,12">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition Height="124"/>
                <!--<RowDefinition Height="100"/>-->
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>

            <!-- Beat -->
            <Rectangle x:Name="BgBeat" Grid.Row="0" Grid.Column="0" Fill="#FFE21B1B" Margin="12,0,0,0"/>
            <Image x:Name="ImgBeat" Grid.Row="0" Grid.Column="0" Source="/Assets/Instruments/beat.png" Tap="ImgInstrument_Tap"/>

            <!-- Sax -->
            <Rectangle x:Name="BgSax" Grid.Row="0" Grid.Column="1" Fill="#FF1BE263" Margin="0,0,12,0"/>
            <Image x:Name="ImgSax" Grid.Row="0" Grid.Column="1" Source="/Assets/Instruments/sax.png" Tap="ImgInstrument_Tap"/>

            <!-- Voice -->
            <Rectangle x:Name="BgVoice" Grid.Row="1" Grid.Column="0" Fill="#FF1BC7E2" Margin="12,0,0,0"/>
            <Image x:Name="ImgVoice" Grid.Row="1" Grid.Column="0" Source="/Assets/Instruments/microphone.png" Tap="ImgInstrument_Tap"/>

            <!-- Guitar -->
            <Rectangle x:Name="BgGuitar" Grid.Row="1" Grid.Column="1" Fill="#FFF3E238" Margin="0,0,12,0"/>
            <Image x:Name="ImgGuitar" Grid.Row="1" Grid.Column="1" Source="/Assets/Instruments/guitar.png" Tap="ImgInstrument_Tap"/>

            <!-- Commands -->
            <Button Grid.Row="2" Grid.Column="0" x:Name="BtnSetup" Content="Setup NFC Tags" Click="BtnSetup_Click" Margin="0,24,0,0" />
            <Button Grid.Row="2" Grid.Column="1"  x:Name="BtnUnlock" Content="Unlock Guitar" Click="BtnUnlock_Click" Margin="0,24,0,0" />

        </Grid>
    </Grid>

</phone:PhoneApplicationPage>